import os
import re


def remove_log():
    all_logs_path = os.path.dirname(os.path.abspath(__file__)) + "\\All_Logs"
    all_error_path = os.path.dirname(os.path.abspath(__file__)) + "\\Error_Logs"
    paths = []
    paths.append(all_logs_path)
    paths.append(all_error_path)
    for logs in paths:
        fs = os.listdir(logs)
        for f in fs:
            if re.search(r".log", f):
                ff = os.path.join(logs, f)
                try:
                    os.remove(ff)
                except:
                    pass


if __name__ == '__main__':
    remove_log()